home *** CD-ROM | disk | FTP | other *** search
/ The Sunday Times: The Month 2004 August / The Sunday Times - The Month 2004-08.iso / pc / engine / shell / shell.swf / scripts / frame_3 / DoAction_4.as < prev    next >
Encoding:
Text File  |  2004-07-06  |  2.6 KB  |  105 lines

  1. TardisInterface = {};
  2. TardisInterface.isSplashAnimating = false;
  3. TardisInterface.showInterface = function(pLevel, blnShow)
  4. {
  5.    trace("* TardisInterface.showInterface(" + pLevel + "," + blnShow + ")");
  6.    switch(pLevel)
  7.    {
  8.       case 0:
  9.          return false;
  10.       case 1:
  11.          this.toggleSplash(blnShow);
  12.          this.toggleIntro(blnShow);
  13.          this.toggleTemplate(blnShow);
  14.          this.toggleMainNav(true);
  15.          break;
  16.       case 2:
  17.          this.toggleSplash(blnShow);
  18.          this.toggleIntro(blnShow);
  19.          this.toggleTemplate(blnShow);
  20.          this.toggleMainNav(blnShow);
  21.    }
  22. };
  23. TardisInterface.setHeader = function(strLabel)
  24. {
  25.    if(strlabel == "" || strLabel == null)
  26.    {
  27.       strLabel = "default";
  28.    }
  29.    Tardis.header.go(strLabel);
  30. };
  31. TardisInterface.setObjProperty = function(prop, val)
  32. {
  33.    this[prop] = val;
  34. };
  35. TardisInterface.toggleSplash = function(blnShow)
  36. {
  37.    if(Tardis.splash)
  38.    {
  39.       if(blnShow == false)
  40.       {
  41.          if(this.isSplashAnimating == true)
  42.          {
  43.             this.setObjProperty("isSplashAnimating",false);
  44.             Tardis.OverlayController.setObjProperty("resumeSplashAnim",true);
  45.             Tardis.splash.hide();
  46.          }
  47.       }
  48.       else if(Tardis.OverlayController.resumeSplashAnim == true)
  49.       {
  50.          this.setObjProperty("isSplashAnimating",true);
  51.          Tardis.OverlayController.setObjProperty("resumeSplashAnim",false);
  52.          Tardis.splash.resume();
  53.       }
  54.    }
  55. };
  56. TardisInterface.toggleIntro = function(blnShow)
  57. {
  58.    if(blnShow == false)
  59.    {
  60.       if(Tardis.intro)
  61.       {
  62.          trace("!!!!!!! Hide the intro (add some code here though)");
  63.       }
  64.    }
  65.    else if(Tardis.intro)
  66.    {
  67.       trace("!!!!!!! Show the intro (add some code here)");
  68.    }
  69. };
  70. TardisInterface.toggleTemplate = function(blnShow)
  71. {
  72.    if(blnShow == true)
  73.    {
  74.       var val = false;
  75.    }
  76.    else
  77.    {
  78.       var val = true;
  79.    }
  80.    if(ActiveSection != null)
  81.    {
  82.       !blnShow ? itemHide() : itemShow();
  83.       Tardis.template.showMask(val);
  84.    }
  85.    if(Tardis.sideMenu.active)
  86.    {
  87.       Tardis.sideMenu._visible = blnShow;
  88.    }
  89.    if(Tardis.adverts.enabled == true)
  90.    {
  91.       !blnShow ? Tardis.adverts.interrupt() : Tardis.adverts.resume();
  92.    }
  93.    Tardis.adverts._visible = blnShow;
  94. };
  95. TardisInterface.toggleMainNav = function(blnShow)
  96. {
  97.    Tardis.bottomNav._visible = blnShow;
  98. };
  99. TardisInterface.enableContent = function(val)
  100. {
  101.    trace("");
  102.    trace("!!! TardisInterface.enableContent() has been called but has been disabled..... FIX IT!");
  103.    trace("");
  104. };
  105.